package br.ufpe.cin.imlm2.jbeat.soot.throwableset.tags;

import java.util.HashSet;
import java.util.Set;

import soot.SootMethod;
import soot.tagkit.AttributeValueException;
import soot.tagkit.Tag;

public class PropagatesToTag implements Tag {
	
	public static final String TAG_NAME = "PropagatesToTag";
	
	private Set<SootMethod> methods;

	public PropagatesToTag() {
		this.methods = new HashSet<SootMethod>();
	}
	
	public void addMethod(SootMethod meth){
		this.methods.add(meth);
	}
	
	public final Set<SootMethod> getMethods() {
		return methods;
	}

	@Override
	public String getName() {
		return TAG_NAME;
	}

	@Override
	public byte[] getValue() throws AttributeValueException {
		return this.toString().getBytes();
	}
	
	@Override
	public String toString() {
		return methods.toString();
	}

}
